package thread;

class MyRunnable implements Runnable {
    @Override
    public void run() {

    }
}
//创建一个类实现runnable接口，实例化这个类传给Thread
public class Demo2 {
    public static void main(String[] args) {
        Thread t = new Thread(()->System.out.println("heihei"));
        t.start();
    }
}
